/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : led_manager_proxy.cc
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2022-02-13 init v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
********************************************************************************
*/
#include <stdio.h>
#include "led_manager_proxy.h"
#include "msg_manager.h"

#define LOGI(fmt, args...) printf(fmt, ##args)
#define LOGD(fmt, args...) printf("%d LedManagerProxy D: " fmt, __LINE__, ##args)
#define LOGW(fmt, args...) printf("%d LedManagerProxy W: " fmt, __LINE__, ##args)
#define LOGE(fmt, args...) printf("%d LedManagerProxy E: " fmt, __LINE__, ##args)

CLedManagerProxy::CLedManagerProxy()
{
    
}

CLedManagerProxy::~CLedManagerProxy()
{

}

void CLedManagerProxy::ShowHorseLight(int index)
{
    SLedCmd cmdInfo;

    cmdInfo.type = LED_HORSE;
    cmdInfo.intValue1 = index;
    SendMsgEvent(&cmdInfo, sizeof(SLedCmd));
}

void CLedManagerProxy::ShowBreathLight(int index)
{
    SLedCmd cmdInfo;

    cmdInfo.type = LED_BREATH;
    cmdInfo.intValue1 = index;
    SendMsgEvent(&cmdInfo, sizeof(SLedCmd));
}

void CLedManagerProxy::OpenLight(int index)
{
    SLedCmd cmdInfo;

    cmdInfo.type = LED_OPEN;
    cmdInfo.intValue1 = index;
    SendMsgEvent(&cmdInfo, sizeof(SLedCmd));
}

void CLedManagerProxy::Stop(int index)
{
    SLedCmd cmdInfo;

    cmdInfo.type = LED_STOP;
    cmdInfo.intValue1 = index;
    SendMsgEvent(&cmdInfo, sizeof(SLedCmd));
}
